package com.city.project.service.impl;

import com.city.project.factory.DaoFactory;
import com.city.project.model.Student;
import com.city.project.service.IStudentService;

import java.util.List;

public class StudentServiceImpl implements IStudentService {
    @Override
    public List<Student> getList(String name) {
        return DaoFactory.getStudentDao().getList(name);
    }

    @Override
    public Student getOne(int id) {
        return DaoFactory.getStudentDao().getOne(id);
    }

    @Override
    public void add(Student room) {
        DaoFactory.getStudentDao().add(room);
    }

    @Override
    public void update(Student room) {
        DaoFactory.getStudentDao().update(room);
    }

    @Override
    public void delete(int id) {
        DaoFactory.getStudentDao().delete(id);
    }
}
